package com.yyk.config.commonService.exception;

import com.yyk.config.commonService.enumeration.HttpStatusEnum;
import lombok.Data;

/**
 * @author ljp
 * @CLASSNAME YYKCloudException
 * @date 2020/12/2 10:22
 * @description：
 */

@Data
public class YYKCloudException extends RuntimeException {
    private Integer code;
    private String msg;
    private Long timestamp = System.currentTimeMillis();

    public YYKCloudException() {
        super();
    }

    public YYKCloudException(String msg) {
        super(msg);
        this.msg = msg;
        this.code = HttpStatusEnum.HTTP_AUTO_RUNTIME.getCode();
    }

    public YYKCloudException(Integer code, String msg) {
        super(msg);
        this.code = code;
        this.msg = msg;
    }
}
